<?php
include "../../public/common/config.php";
$sql = "select * from class";
$result = mysql_query($sql);
?>
<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8" />
		<title></title>
		<link rel="stylesheet" type="text/css" href="../public/css/common.css"/>
	</head>
	<body>
		<div class="main">
			<form action="insert.php" method="post">
				<p>品牌名称：<input type="text" name="name" /></p>
				<p>选择分类：</p>
				<p>
					<select name="class_id">
						<?php
							while($row = mysql_fetch_assoc($result)){
								echo "<option value='{$row['id']}'>{$row['name']}</option>";
							}						
						?>					
					</select>
				</p>
				<p><input type="submit" value="添加"/></p>
			</form>
		</div>
	</body>
	
</html>